
import threading
import time
import re
from TDlib.reflect import reflect as R
from core.Spider import myhttp


'''
class work(threading.Thread):
    def __init__(self,name):
        threading.Thread.__init__(self)
        self.setName(name)
        self.setDaemon(False)
        
    def run(self):
        while True:
            print(self.name,end="")
a=work("a")
b=work("b")
c=[a,b]
for i in range(0,len(c)):
    c[i].start()
'''
content,status_code=myhttp().getcontent("http://news.baidu.com")
re_domain=re.compile('(http|https)://([\w]+\.)+.([\w]+)',re.I)
domainName=re_domain.finditer(content)
print(domainName)
for item in domainName:
    print(item.group(0))
